#include <QCoreApplication>

#include "rpc_server.h"
#include "connection.h"

using namespace rest_rpc;
using namespace rpc_service;



struct dummy{
    int add(rpc_conn conn, int a, int b){return a+b;}
};

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    rpc_server server(9000, std::thread::hardware_concurrency());

    dummy d;
    server.register_handler("add", &dummy::add, &d);

    server.run();
    return a.exec();
}
